package com.shareyi.study.springboot;

import com.shareyi.study.springboot.common.JoyWindowHolder;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

import static org.springframework.boot.SpringApplication.run;

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class SpringbootApplication {

	public static void main(String[] args) throws InterruptedException {
		ConfigurableApplicationContext configurableApplicationContext = SpringApplication.run(SpringbootApplication.class, args);
		ConfigurableEnvironment configurableEnvironment = configurableApplicationContext.getEnvironment();
		/*String port = configurableEnvironment.getProperty("server.port");
		JoyWindowHolder.getInstance().init(port);
		while (true){
			Thread.sleep(5000);
		}*/
	}
}
